package bulidStream;

import java.util.Comparator;
import java.util.stream.Stream;

/**
 * @Author wangtengyu
 * @Create 2018-06-06-15:49
 * 由值创建流
 */
public class Test1 {
    public static void main(String[] args) {

//        List list= Arrays.asList(1,2,3,4,5);
//        list.sort(Comparator.naturalOrder().reversed());
//        list.forEach(System.out::print);

        Stream<String> stringStreams=Stream.of("hello","wty","is","a","good","day");
        //stringStream.forEach(System.out::println);

        Stream<Integer> integerStream=Stream.of(1,2,3,4,5);
        integerStream.sorted(Comparator.comparing(a->a.toString()).reversed()).forEach(System.out::println);
    }

}
